Useful macros
=2.0 Macro Guide= Portions of this guide can also be found on the the WoW forums: Neuro's Macro Guide for WoW 2.0. Ongoing discussion and development changes from Blizzard can be found here: 2.0 Changes - Concise List (New) Changes In WoW 2.0 a new macro system is being introduced to wow with new restrictions and also possibilities. First of all: In TBC macros won't be able to target Units or cast spells using the scripting interface when initiating. This means that a macro like the one below: /script if (UnitMana("player")>54) then CastSpellByName("Heroic Strike"); end won't work anymore. CastSpellByName won't be able to be called in combat, and TargetUnit, TargetByName or other similar functions won't be accessable at all both in and out of combat. Several other functions has also been disabled when the character is in combat. I don't remember all of them on top of my head, but here are some of them, namely pet macros: PetAttack() PetFollow() PetPassiveMode() PetAggresiveMode() SpellStopCasting() Switching action bars in combat won't be programatically possible without user interaction. These are getting replaced with slash commands that you can use, aka. the slash commands will work in TBC. Syntax /command option action; option1,option2 action The new command format for '/cast' is: /cast [] ; [] ; [] ; ... Some additional tricks you can do with the options: You can add 'no' to the beginning of any option (except target) to invert it, i.e. 'nocombat' will only work if you are NOT in combat. Seperating options with a comma ',' will act like an 'and' statement; if both options are true, it executes. Seperating options with a slash '/' will act like an 'or' statement; if either option is true, it executes. Selecting the '?' Icon in the Macro Editor will force the macro to present the icon of the current spell that spell feedback is being given for. Macro Feedback * # and - are comment prefixes in macros * A macro that starts with # show shows feedback for that spell, # show none shows no feedback. * Otherwise the first /cast, /randomcast, /castsequence, /use, or /randomuse command is used to select the feedback spell * Sequences actually cycle the item/spell they show feedback for to match the next in seqence. * A new question mark macro icon is available, selecting that will cause the feedback spell/item's icon to be used. Spell Casting * When casting a ranked buff spell that's too high a level for a friendly target the game will automatically use the highest appropriate rank of the spell instead. * Toggleable abilities will have a 1.5 second delay after being cast before they can be cancelled by clicking on them, to prevent accidentally canceling them. You can still right click a buff to cancel it anytime. Logic The way a macro works now is like this: The first set of options is checked. If they are true, then the first spell is cast. If they are false, the next set of options is evaluated, and if true, the next spell is cast, and so on. However, you must keep in mind that only one spell will be cast. As soon as a set of options evaluates to true, the game will cast the corresponding spell, and that line of the macro will be done. The first cast in a macro that fails will prevent further casts in the macro as if the 1.5 second global cooldown had been triggered. The /cast, /use, /cancelaura, /changeactionbar, /equip, /target, /focus, /assist, /targetenemy, /targetfriend, /targetparty, and /targetraid commands can be given multiple actions and conditions on which to use those actions. The first matching action will be used. Item names can be used interchangably with spell names in /cast, /castrandom, and /castsequence Poisons, feeding your pet, etc. will be even easier to macro: /cast Feed Pet then /use Dry Pork Ribs. You will also be able to click on food in your action bar when you are targeting Feed Pet and other item targeting spells. Commands **/cancelaura **/focus **/stopmacro Action bar */changeactionbar and * /swapactionbar Attacking * /startattack unit * /stopattack Buffs/Auras * /cancelaura name - cancels an aura as if it were right clicked Buttons * /click ButtonName mousebutton Casting * /castrandom , , will attempt to cast a randomly selected one of the specified spells * /castsequence ** * /stopcasting will cancel the spell that is currently being cast Items and Equipment * /equip * /equipslot * /use * /use * /use * /userandom , , will attempt to use a randomly selected one of the specified items Pet control * /petaggressive * /petattack * /petautocaston * /petautocastoff * /petdefensive * /petfollow * /petpassive * /petstay Targeting * /assist * /clearfocus * /cleartarget * /targetlasttarget Target Cycling * /targetenemy * /targetfriend * /targetparty * /targetraid Castsequence It allows you to set up a series of spells to cast one after another, on each subsequent click of the macro. When it gets to the end, it goes back to the beginning. The format is: /castsequence [] reset=<#>/target/combat , , * The reset line can specify a number of seconds after which a sequence resets, or if it should reset on target change or leaving combat. * The sequence tracks the 'next' spell in the sequence until it resets, the next spell only advances on a successful cast. * You can specify a conditional at the start of the command before the reset to filter whether the sequence is used (You cannot use per-spell conditionals) * You can specify items as well as spells * If the spell fails to cast (due to cooldown, out of range, not enough mana, whatever) then the sequence does NOT go to the next spell. The next time you click the macro, it'll try to cast again. (NOTE: A resist, dodge, parry, etc does NOT count as a failed cast. The spell/ability successfully went off, it just missed.) Castsequence Example: /castsequence Frost Nova, Blink The first time you click it, you Frost Nova, then you click again and Blink away. /castsequence combat Frost Nova, Blink /castsequence reset=24 Frost Nova, Blink The first time you click it, you Frost Nova. If you decide not to Blink, after 24 seconds it will reset back to Frost Nova. Since Frost Nova's cooldown also happens to be 24 seconds, it'll be ready to use again. /castsequence Corruption, Immolate, Curse of Agony You can just push that button three times and cast all three DoTs. /castsequence reset=combat/target Corruption, Immolate, Curse of Agony Any time you change targets (like, if the old target is almost dead and you want to start on a new one), or any time you leave combat (perhaps the critter died before you finished casting all the dots), it resets your sequence for you, leaving you ready to start over. Options * actionbar: - Evaluates 'true' if the current actionbar is the same as the listed one. * button:<#> - Evaluates 'true' if the selected button was used to 'click' the spell, defaults to 1 (see below). * channeling: - Evaluates true if you are channeling the spell listed. With no spell listed, it evaluates true if any spell is being channeled. * combat - Evaluates 'true' if you are in combat. * equipped:|| - Evaluates 'true' if item is equipped. Item can be any valid inventory slot, item class or item subclass. * exists and dead - Evaluates true if your target is dead, or actually exists. * focus * help - Evaluates 'true' if target is friendly * harm - Evaluates 'true' if target is hostile * indoors, outdoors - Evaluates 'true' if you are indoors or outdoors, respectively. * modifier or modifier:shift|ctrl|alt - Evaluates 'true' if the selected key is held down when the command is executed. * mounted, swimming, flying - Evaluates 'true' if you are mounted, swimming, or flying, respectively. * pet: - Evaluates 'true' if the pet exists. Takes pet type (Owl, Bear, Imp) or pet name (Fluffy, MrBigglesworth). With no modifier (i.e. just pet) it evaluates 'true' if ANY pet exists. * show - Shows macro feedback for the listed spell * stance or stance:# - Evaluates 'true' if you are in a stance, or are in a particular stance (see below) * stealth - Evaluates 'true' if you are stealthed. * target= - Special option. It changes the target from the default of "target" to any valid unitid. (see below) Equipped Option The equipped option also works the same way, but it's a bit trickier. The argument can be either an Inventory Slot (see below), an item type, or an item subtype. For a list of item types and subtypes, check here: http://www.wowwiki.com/ItemType A List of Inventory Slots: *Two-Hand *Bag *Shirt *Chest *Back *Feet *Finger *Hands *Head *Held In Off-hand *Legs *Neck *Ranged *Chest *Off Hand *Shoulder *Tabard *Thrown (ranged slot items like thrown daggers) *Trinket *Waist *One-Hand *Main Hand *Off Hand *Wrist Some equipped examples: /cast Swords Mortal Strike; Heroic Strike This will cast Mortal Strike if you are using a 2hand sword. /cast Swords/Two-Handed Maces/Two-Handed Axes/Polearms Mortal Strike This uses the '/' modifier to set up an 'or' condition. This macro will cast Mortal Strike if ANY of those types are equipped. /cast equipped:Shields Shield Bash This will cast Shield Bash if you have a shield equipped. /cast equipped:Daggers Shield Slam This will cast Shield slam only if you have a dagger AND a shield equipped. /cast equipped:Off Hand Rampage This will cast Rampage if you do NOT have a shield equipped, AND you have something in the Off Hand slot. In theory, this macro will only activate if you are dual-wielding. Button Options The option button: works similarly to the modifier button. Normally, if you left-click a button, it performs whatever action is in that spell, in our case a macro. However, if you set the button option, you can change the behavior of a particular macro. The default button is 1, the Left Mouse button. Note that when you activate a macro via a keybinding, it treats it like a Left Mouse button click. The numbered buttons are: 1 or LeftButton 2 or RightButton 3 or MiddleButton 4 or Button4 5 or Button5 ... or any of the buttons remapped by the secure state headers. I don't know what this last bit means, to be honest, I'm simply quoting slouken. /cast button:2,target=player Flash Heal; help Flash Heal This macro would cast Flash Heal on a friendly target, OR if you clicked it with the right mouse button, it would cast Flash Heal on you. Focus Focus is a new feature allowing you to save a target. Example: /focus target ...will save your current target as your focus. This means that you at any time can use /target focus to target the unit you designated with /focus target. Focus supports option parameters. Example macro: /cast target=focus,exists Polymorph /castrandom target=focus,exists Polymorph, Polymorph: Pig, Polymorph: Turtle If you want a random Polymorph This works like your "personal" raid icon which makes it easy to keep track of sheeps etc. Hover Targeting A feature that i posted my concerns about on the US forums has been saved (but only because Slouken is so freaking awesome). We are talking Hover Targeting, or the ability to dynamically cast spells on different players without having to target them, but by just hovering your mouse cursor over a protected unit frame (in this case a party/raid/target/targettarget unitframe). Example: /cast target=mouseover,exist Healing Touch; Healing Touch ...will cast Healing Touch on the person which unitframe is being hovered over by your mouse, regardsless of your current target. This works with modifier keys and can do different stuff if you are not hovering over a unitframe. Ill give a more advanced macro: /cast target=mouseover,exist,nomodifier:shift/ctrl/alt Swiftmend; target=mouseover,exist,modifier:shift Healing Touch; target=mouseover,exist,modifier:ctrl Rejuvenation; target=mouseover,exist,modifier:alt Regrowth; modifier:ctrl Cat Form; modifier:shift Dire Bear Form; noswimming Travel Form; swimming Aquatic Form ...would cast Swiftmend/Rejuvenation/Regrowth/Healing Touch if your mouse is hovering over a UnitFrame depending on which modifier keys you have pressed down. If your mouse, however, is NOT over a Unit Frame (but some other random place on the screen) it will shapeshift depending on the options you specified. In other words, you will technically have put all your standard healing spells and shapeshifts into a single button who acts differently depending on if your mouse is over a unitframe or not and depending on which modifier keys you use. Modifier Modified clicks by default are not set up to do anything, so that addons can easily extend them. This predates the conversion of the unit frames and action buttons to secure action buttons, so now it's easy to extend them to support modified clicks. /script PlayerFrame:SetAttribute("*type", "target"); ... etc. Shift click defaults to picking up actions from the action bar, so if you want to use the shift key, you'll need to explicitly enable it: /script ActionButton1:SetAttribute("shift-type", "action"); ... etc. It would be very easy to make an addon that does this for all of the unit frames and action buttons. In 2.0.2, the modified clicks work the same as unmodified clicks, but I wanted everyone to know how to do it themselves if they wanted to do it sooner. Remember that for key bindings, SHIFT-N and CTRL-N are already bound by default in the keybinding UI. Stance Options Stances work the same way. If no stance number is given, then it evaluates to 'true' if the player is in any stance. (Note that for Warriors, you are ALWAYS in some stance). If a number is given, it checks to see if that form is currently active. Each class has different numbers for it's stances. Here is a list of stances and their numbers: /cast stance:1 ; stance:2 ; stance:3 Generic Stance Macro: Replace <* Stance Ability> with whatever you want. Paladin Auras are no longer treated as Stances by the Macro Option system. Keep in mind that if you skip a stance (like a Warrior who never does the Defensive Stance quest) then your stance numbers will drop down, i.e. Berserker Stance would be stance 2. Some stance examples. /cast nostance Bear Form If you are not in a form, this will shift you into bear form. /cast stance:1 Overpower; stance:2 Sunder Armor; stance:3 Whirlwind Will cast Overpower in Battle stance, Sunder Armor in Defensive, and Whirlwind in Berserker stance /cast stance:1 Growl; stance:3 Claw Will cast Growl in Bear form, or Claw in Cat form. /cast nostance:3 Cat Form Will put you into cat form if you are not. If you are currently in Cat form, this will NOT shift you out. Target Options The target=unit is a special option. Instead of evaluating to 'true' or 'false', it changes the target of the following spell AND the target of the other options. "Unit" can be any valid unit type, i.e. "player", "target", "targettarget", "party1", "party1target", etc etc. For more on unit types, go here: http://www.wowwiki.com/UnitId Keep in mind that every spell has a default target of "target". So, for example: /cast help Greater Heal is the same as /cast help Greater Heal Unless you add in a target=unit option, the default will be your current target. Possible examples of target=unit: /cast target=player Flash Heal This spell will always cast flash heal on yourself. Note that your current target will be unchanged. /cast help Flash Heal; target=targettarget Flash Heal This will cast Flash heal on your target if it is friendly, OR it will cast Flash Heal on your target's target. /cast combat Flash Heal; nocombat Greater Heal; help, combat Flash Heal; target=player Greater Heal This will either 1) Cast flash heal if the target is friendly and you are in combat, 2) cast greater heal if the target is friendly and you are NOT in combat, 3) cast Flash Heal on your target's target if you are in combat and that unit is friendly, or if none of those conditions is true, it will cast Greater Heal on yourself. If you use the unitid "none" it acts as if you had NO target. For example: /cast target=none Dispel Magic This would cast Dispel Magic and then ask for a target, regardless of whom you have targetted currently. Example Macros General Macros /use target=self Heavy Netherweave Bandages This macro will always use Heavy Netherweave Bandages on yourself, regardless of target. /use nomounted,outdoors Black War Steed Bridle This will attempt to mount if you are outside and not mounted. Druid Macros /cancelaura stance:1 Bear Form; stance:2 Aquatic Form;stance:3Cat Form;stance:4Travel Form Caster Form: /cancelaura stance:1 Bear Form; stance:2 Aquatic Form;stance:4Travel Form /cast nostance Cat Form Go to Cat form from any stance: /cancelaura stance:1 Bear Form; stance:2 Aquatic Form;stance:4Travel Form /cast nostance Cat Form; nostealth Prowl Go to Cat form and stealth from any stance /use nocombat,outisde Mount /cast swimmingAquatic Form; outdoors Travel Form Go to the 'best' travel form /cast stance:1 Dire Bear Form; stance:2 Aquatic Form; stance:4 Travel Form; stance:5 Moonkin Form; nostance Cat Form Unshift everything and shift into Cat Form. Hunter Macros /cast combat Mend Pet; nocombat Feed Pet /use nocombat Feed/Mend Pet based on combat status. /cast target=pet,dead Revive Pet; nopet Call Pet; Mend Pet This will revive your pet if it's dead, call your pet if you don't have him out, or mend your pet. /cast pet Call Pet; Revive Pet This macro will call your pet if you do not have one, otherwise it attempts to cast Revive Pet. /cast pet:owl Dive; pet:cat Dash; pet Growl This macro will cast Dive if you have an owl, Dash if you have a cat, or Growl if you have anything else. #show Rapid Fire /cast Rapid Fire /stopcasting /cast Troll Berserk(Racial) /stopcasting /cast Arcane Shot(Rank 7) Mage Macros /cast nocombat Pyroblast; Fireball Pyro/Fireball: Casts Pyro if you're not in combat (as an opener), Fireball otherwise. /cast target=focus Polymorph Polymorph Focus: Will always polymorph your focus target. #show Frostbolt /cast Presence of Mind /stopcasting /cast Arcane Power /stopcasting /cast Frostbolt /cast harm Polymorph /stopmacro noharm /p Sheeping %t! DO NOT TOUCH! This macro will cast Polymorph if the target is hostile, then stop the macro if the target is NOT hostile (i.e. if the polymorph didn't go off). Then it tells the party that it's target has been Sheeped. Note that because of the '/stopmacro' command, if the target was not sheeped, the party would not be sent a tell (thus cutting down on unneccessary spam). Paladin Macros Priest Macros /cast help Greater Heal; help Greater Heal Greater Heal on current boss target, or on current target. /cast button:2 Prayer of Fortitude; Power Word: Fortitude Left click casts single Fort, Right click casts Group Fort. Rinse and repeat for Divine Spirit, Shadow Protection, Mark of the Wild, Arcane Intellect, or any of the paladin blessings. Rogue Macros /cast stealth Ambush; Backstab This will cast Ambush if the player is stealthed, Backstab if not. /cast nostealth Backstab; Ambush Does the exact same thing as above, just in a different way. /cast nocombat,nostealth stealth; stealth cheapshot; combat eviserate Shaman Macros Warlock Macros /cast pet:Voidwalker Sacrifice; pet:succubus Seduction Will cast Sacrifice if you have a Voidwalker out, Seduction if you have a Succubus. Warrior Macros /cast nocombat,stance:1 Charge; combat,nostance:3 Berserker Stance; nocombat,nostance:1 Battle Stance; combat,stance:3 Intercept Intercept/Charge: It either charges/intercepts, or puts you into the correct stance. /cast stance:1 Overpower; Battle Stance Overpower: A very simple Overpower macro /cast combat Intercept; combat Berserker Stance; stance:1 Charge; Battle Stance If you're in combat and in Berserker Stance, it'll cast Intercept. If you're in combat and any other stance, it will put you into Berserker Stance. The same goes for out of combat, Battle Stance, and Charge. =Macros Pre 2.0= MacrosPre2.0 ---- Go to Macros Go to Interface Customization Category:Macros